﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using formworks;
using entity;

using System.Data;
using System.Reflection;

namespace test
{
    class Program
    {

        
        static void Main(string[] args)
        {

            //DB db = new DB();
            ////DataSet ds = db.getData();

            //Console.WriteLine(ds.Tables.Count);

            QueryBase qb = new QueryBase();
            SqlBuilder<Test> q = new SqlBuilder<Test>();

            string[] users = new string[]
            {
                "ID",
                "name",
                "sex"

            };

            Test test = new Test();

            //q.Select(new object[]
            //{
            //    test.id,
            //    test.sex
            //});

            //Console.WriteLine(Test.Member.name);

            //Console.WriteLine(q.ToString());

           //Test t = new Test();
           //Users u = new Users();


            //q.Select(Test.Member.id, Test.Member.name).From(Test.Tables, Users.Tables).Where(Test.Member.id).Equals("293937778-232").OrderBy(Test.Member.sex).DESC();

            Console.WriteLine(q.ToString());
           


            //TimeSpan ts1 = new TimeSpan(DateTime.Now.Ticks);
            //for (int i = 0; i < 1000; i++)
            //{
            //    q.Select(users).From("Table1").Where("ID").Equals(2).And("name").Like("%zx").OrderBy().DESC("name").ASC("sex").ASC("ID").DESC("ABC").UnionAll().Select().From("zz").Where("cd").Like("zz").Not().IsNull().ToString();
            //    q.clear();
            //}
            //TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks);

            //TimeSpan ts = ts2.Subtract(ts1).Duration();
            ////时间差的绝对值 
            //String spanTime = ts.Hours.ToString()
            //    + "小时"
            //    + ts.Minutes.ToString()
            //    + "分"
            //    + ts.Seconds.ToString()
            //    + "秒"
            //    + ts.Milliseconds.ToString()
            //    + "毫秒";

            //Console.WriteLine(spanTime);
            //Console.WriteLine(q.ToString());        
            

            
            
          
            
            //var vv =  ac.ToString().Replace('=', ':');
            

            Console.ReadLine();
        }//end main
    }
}
